home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 July
/
EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso
/
earcd
/
biz
/
misc
/
amibroke.lha
/
AmiBroker200E
/
ARexxDemo.abrx
< prev
next >
Wrap
Text File
|
1995-12-17
|
3KB
|
119 lines
/* ARexxDemo.abrx
**
** This one is very simple AmiBroker & ARexx demonstration script
**
** Copyright (C)1995 by Tomasz Janeczko
**
** You have my permission to use and modify this file
** when writing your custom ARexx scripts.
**
*/
address AMIBROKER.1 /* assumes there's only one copy of program */
options results
'SCREEN FRONT' /* make sure we're at the top */
'DATABASE STATUS' /* check if database has been changed to allow clean exit */
isChanged = result
'VERSION' /* get program version ID */
'REQUEST BODY "Welcome to the demonstration of|' || result || '" TITLE "ARexx & AmiBroker Demo" BUTTONS "Start!"'
'REQUEST BODY "Now, I will show you some examples of|using AmiBroker`s ARexx commands" BUTTONS="Show me!|Exit"'
if (result = 0) THEN
DO
'REQUEST BODY "Do yu really want to|quit the demo?" TITLE="Confirm..." BUTTONS="Yes!|Oh no!"'
if (result = 1) THEN EXIT
END
'REQUEST BODY "First I will select WIG" BUTTONS="Let it be"'
'SELECT STOCK WIG'
'REQUEST BODY "... and I will mark a qoutation"'
'SELECT DATE 95-09-01'
'REQUEST BODY "And now, I will move this hair-line"'
do day = 1 to 31
'SELECT DATE 95-09-' || day
end
do day = 1 to 31
'SELECT DATE 95-10-' || day
end
do day = 1 to 31
'SELECT DATE 95-10-' || 32-day
end
do day = 1 to 31
'SELECT DATE 95-09-' || 32-day
end
'REQUEST BODY "Now, I will add AMIGA to the stock list" BUTTONS="Go on!"'
'ADDSTOCK AMIGA'
'SELECT STOCK AMIGA'
'REQUEST BODY "Hmm...This chart is empty!|So, I will add some quotes..."'
price = 20;
/* now add some random prices */
do day = 1 to 30
price = price + (RANDOM()/500 - 1)
volume = 100*RANDOM()
'ADDQUOTATION AMIGA DATE=95-10-' || day || ' VOLUME=' || volume || ' PRICE=' || price
end
do day = 1 to 30
price = price + (RANDOM()/500 - 1)
volume = 100*RANDOM()
'ADDQUOTATION AMIGA DATE=95-11-' || day || ' VOLUME=' || volume || ' PRICE=' || price
end
do day = 1 to 30
price = price + (RANDOM()/500 - 1)
volume = 100*RANDOM()
'ADDQUOTATION AMIGA DATE=95-12-' || day || ' VOLUME=' || volume || ' PRICE=' || price
end
'REFRESH'
'REQUEST BODY "Well, do you like it?|It`s very interesting that random prices|look so `natural`"'
'REQUEST BODY "Now, I will remove AMIGA from the list" BUTTONS="Go on!"'
'REMSTOCK AMIGA'
'REQUEST BODY "AmiBroker supports open, close, high, low prices.|Take a look at APPLE (The most famous fruit in Wall Street :-) ) "'
/* add stock and import quotations in ASCII format */
'ADDSTOCK APPLE CONT'
'SELECT STOCK=APPLE'
'REQUEST BODY "Now I will import some quotes|from simple ASCII file (look at `examples` drawer)!"'
'IMPORT ASCII FILE=Examples/Apple'
'REQUEST BODY "Now you can see Japanese Candlestick chart|showing open, close, high and low prices"'
'REQUEST BODY "Now I will remove APPLE from the list"'
'REMSTOCK APPLE'
'REQUEST BODY="Thank you for your attention.|The presentation is over.||(C)1995 Tomasz Janeczko"'
if( isChanged = 0 ) then 'DATABASE NOCHANGE' /* cleanup */